package com.info.servlet;

import java.io.IOException;
import java.io.PrintWriter;
import java.util.Properties;

import javax.servlet.ServletContextEvent;
import javax.servlet.ServletContextListener;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.apache.log4j.Logger;

import com.info.biz.ExcelBiz;
import com.info.data.GlobalData;
import com.info.data.MapDataProvider;

public class ServiceProvider implements ServletContextListener {

	public void contextDestroyed(ServletContextEvent context) {
		// TODO Auto-generated method stub
		
	}

	public void contextInitialized(ServletContextEvent context) {
		// TODO Auto-generated method stub
		System.out.println("================================");
		String path=context.getServletContext().getRealPath("config");
		String filePath=context.getServletContext().getRealPath("fileData");
		GlobalData.upFilePath=filePath;
		GlobalData.configPath=path;
		new ExcelBiz().init();
		System.out.println(" path:"+path);
	}

	
//	public void contextDestroyed(ServletContextEvent arg0) {
//		// TODO Auto-generated method stub
//		
//	}
//
//
//	public void contextInitialized(ServletContextEvent context) {
//		// TODO Auto-generated method stub
//		System.out.println("================================");
//		String path=context.getServletContext().getRealPath("config");
//		System.out.println(" path:"+path);
////		Logger.getLogger(name)
//	}

	

}
